API Documentation
Static Public Member Functions | List of all members
nkAstraeus::lua::nkExportWrap::NodeWrapper Class Referencefinal

Wraps a nkExport::Node and offers functions for use in scripting. More...

Static Public Member Functions

static void updateEnvironment (nkScripts::Environment *env)
 
static void * constructor (const nkScripts::DataStack &stack)
 
static void destructor (void *toDestroy)
 
static nkScripts::OutputValue getString (void *node)
 
static nkScripts::OutputValue getInt (void *node)
 
static nkScripts::OutputValue getFloat (void *node)
 
static nkScripts::OutputValue getDouble (void *node)
 
static nkScripts::OutputValue getBool (void *node)
 
static nkScripts::OutputValue getNodeNature (void *node)
 
static nkScripts::OutputValue getNodeValueType (void *node)
 
static nkScripts::OutputValue getArraySize (void *node)
 
static nkScripts::OutputValue isValueTypeNumber (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue getArrayElement (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue getMemberValue (const nkScripts::DataStack &stack)
 
static void setString (const nkScripts::DataStack &stack)
 
static void setInt (const nkScripts::DataStack &stack)
 
static void setFloat (const nkScripts::DataStack &stack)
 
static void setDouble (const nkScripts::DataStack &stack)
 
static void setBool (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue addElement (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue addMember (const nkScripts::DataStack &stack)
 

Detailed Description

Wraps a nkExport::Node and offers functions for use in scripting.

Member Function Documentation

◆ updateEnvironment()

static void nkAstraeus::lua::nkExportWrap::NodeWrapper::updateEnvironment ( nkScripts::Environment env)
static

Updates a given environment and set it up to use all functions wrapped by this wrapper.

Parameters
envThe environment to set up.

◆ constructor()

static void* nkAstraeus::lua::nkExportWrap::NodeWrapper::constructor ( const nkScripts::DataStack stack)
static

Wrapper function for the constructor of the user type.

local t = nkExport.Node.new() ;
Parameters
stackThe parameter stack.
Returns
An output value with the user type and data allocated.

◆ destructor()

static void nkAstraeus::lua::nkExportWrap::NodeWrapper::destructor ( void *  toDestroy)
static

Wrapper function for the destructor of the user type.

Parameters
toDestroyThe data that has to be freed.

◆ getString()

static nkScripts::OutputValue nkAstraeus::lua::nkExportWrap::NodeWrapper::getString ( void *  node)
static

Wrapper function for the nkExport::Node::getValueAsString() attribute reading.

local d = node.valueString ;
Parameters
nodeThe data from which the attribute will be retrieved.
Returns
The attribute value, as a string.

◆ getInt()

static nkScripts::OutputValue nkAstraeus::lua::nkExportWrap::NodeWrapper::getInt ( void *  node)
static

Wrapper function for the nkExport::Node::getValueAsInt() attribute reading.

local d = node.valueInt ;
Parameters
nodeThe data from which the attribute will be retrieved.
Returns
The attribute value, as an int.

◆ getFloat()

static nkScripts::OutputValue nkAstraeus::lua::nkExportWrap::NodeWrapper::getFloat ( void *  node)
static

Wrapper function for the nkExport::Node::getValueAsFloat() attribute reading.

local d = node.valueFloat ;
Parameters
nodeThe data from which the attribute will be retrieved.
Returns
The attribute value, as an float.

◆ getDouble()

static nkScripts::OutputValue nkAstraeus::lua::nkExportWrap::NodeWrapper::getDouble ( void *  node)
static

Wrapper function for the nkExport::Node::getValueAsDouble() attribute reading.

local d = node.valueDouble ;
Parameters
nodeThe data from which the attribute will be retrieved.
Returns
The attribute value, as a double.

◆ getBool()

static nkScripts::OutputValue nkAstraeus::lua::nkExportWrap::NodeWrapper::getBool ( void *  node)
static

Wrapper function for the nkExport::Node::getValueAsBool() attribute reading.

local d = node.valueBool ;
Parameters
nodeThe data from which the attribute will be retrieved.
Returns
The attribute value, as a bool.

◆ getNodeNature()

static nkScripts::OutputValue nkAstraeus::lua::nkExportWrap::NodeWrapper::getNodeNature ( void *  node)
static

Wrapper function for the nkExport::Node::getNodeNature() attribute reading.

local d = node.nature ;
Parameters
nodeThe data from which the attribute will be retrieved.
Returns
The attribute value, as a nkExport::NODE_NATURE.

◆ getNodeValueType()

static nkScripts::OutputValue nkAstraeus::lua::nkExportWrap::NodeWrapper::getNodeValueType ( void *  node)
static

Wrapper function for the nkExport::Node::getNodeValueType() attribute reading.

local d = node.valueType ;
Parameters
nodeThe data from which the attribute will be retrieved.
Returns
The attribute value, as a nkExport::NODE_VALUE_TYPE.

◆ getArraySize()

static nkScripts::OutputValue nkAstraeus::lua::nkExportWrap::NodeWrapper::getArraySize ( void *  node)
static

Wrapper function for the nkExport::Node::getValueAsString() attribute reading.

local d = node.valueString ;
Parameters
nodeThe data from which the attribute will be retrieved.
Returns
The attribute value, as a string.

◆ isValueTypeNumber()

static nkScripts::OutputValue nkAstraeus::lua::nkExportWrap::NodeWrapper::isValueTypeNumber ( const nkScripts::DataStack stack)
static

Wrapper function for nkExport::Node::isValueTypeNumber().

local d = node:isValueTypeNumber() ;
Parameters
stackThe parameter stack.
Returns
The output value, as a bool.

◆ getArrayElement()

static nkScripts::OutputValue nkAstraeus::lua::nkExportWrap::NodeWrapper::getArrayElement ( const nkScripts::DataStack stack)
static

Wrapper function for nkExport::getArrayElement().

local d = node:getArrayElement(0) ;
Parameters
stackThe parameter stack.
Returns
The output value, as a nkExport::Node.

◆ getMemberValue()

static nkScripts::OutputValue nkAstraeus::lua::nkExportWrap::NodeWrapper::getMemberValue ( const nkScripts::DataStack stack)
static

Wrapper function for nkExport::Node::getMemberValue().

local d = node:getMemberValue("key") ;
Parameters
stackThe parameter stack.
Returns
The output value, as a nkExport::Node.

◆ setString()

static void nkAstraeus::lua::nkExportWrap::NodeWrapper::setString ( const nkScripts::DataStack stack)
static

Wrapper function for nkExport::Node::setAsString(), exposed as an attribute setter.

node.valueString = "str" ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ setInt()

static void nkAstraeus::lua::nkExportWrap::NodeWrapper::setInt ( const nkScripts::DataStack stack)
static

Wrapper function for nkExport::Node::setAsInt(), exposed as an attribute setter.

node.valueInt = 2 ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ setFloat()

static void nkAstraeus::lua::nkExportWrap::NodeWrapper::setFloat ( const nkScripts::DataStack stack)
static

Wrapper function for nkExport::Node::setAsFloat(), exposed as an attribute setter.

node.valueFloat = 0.5 ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ setDouble()

static void nkAstraeus::lua::nkExportWrap::NodeWrapper::setDouble ( const nkScripts::DataStack stack)
static

Wrapper function for nkExport::Node::setAsDouble(), exposed as an attribute setter.

node.valueDouble = 0.5 ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ setBool()

static void nkAstraeus::lua::nkExportWrap::NodeWrapper::setBool ( const nkScripts::DataStack stack)
static

Wrapper function for nkExport::Node::setAsBool(), exposed as an attribute setter.

node.valueBool = false ;
Parameters
stackThe parameter stack.
Returns
The output value, empty.

◆ addElement()

static nkScripts::OutputValue nkAstraeus::lua::nkExportWrap::NodeWrapper::addElement ( const nkScripts::DataStack stack)
static

Wrapper function for nkExport::Node::addElement().

local d = node:addElement() ;
Parameters
stackThe parameter stack.
Returns
The output value, as a nkExport::Node.

◆ addMember()

static nkScripts::OutputValue nkAstraeus::lua::nkExportWrap::NodeWrapper::addMember ( const nkScripts::DataStack stack)
static

Wrapper function for nkExport::Node::addMember().

local d = node:addMember("key") ;
Parameters
stackThe parameter stack.
Returns
The output value, as a nkExport::Node.

The documentation for this class was generated from the following file: